package nowcoder.fallibility;

/**
 * @author Cheng Jun
 * Description: StringBuffer s1=new StringBuffer(10);s1.append(“1234”)，则s1.length()和s1.capacity()分别是多少?
 * https://www.nowcoder.com/test/question/done?tid=61637940&qid=15054#summary
 * @version 1.0
 * @date 2022/9/19 10:29
 */
public class StringBufferLength {

    public static void main(String[] args) {
        StringBuffer s1 = new StringBuffer(10);
        s1.append("1234");
        // length: The count is the number of characters used.
        System.out.println("s1.length() " + s1.length());
        // capacity 是数组的容量 10
        System.out.println("s1.capacity() " + s1.capacity());

        long test=012;
        float f = -412;
        // int a = (int)true;
        double d = 0x12345678;
         byte c = 127;
    }
}
